<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}
	<div class="container containerUser fix pt15">
		{template member/slide}
		<div class="userRight agentReport">
			<div class="userTitle mgb10">代理报表</div> 
			<div id="Proxy_IndexPage" class="userMain">
				<div class="u_codeedit">
					<div id="timeType" class="newTab">
						<a href="javascript:void(0);" class="curr">今天</a>
						<a href="javascript:void(0);"  class="">昨天</a>
						<a href="javascript:void(0);"  class="">本月</a>
						<a href="javascript:void(0);"  class="">上月</a>
					</div> 
					<ul class="todayView mgb10">
						<input type="text" placeholder="下级报表查询" class="userInput" id="id_for_user">&nbsp;
                		<a href="javascript:void(0);"  class="submitBtn ClickShade" id="id_search">搜索</a>
                	</ul> 
                	<div class="notContent" style="padding: 100px 0px; display: none;">
                		<div class="iconLoadingCon" style="transform: scale(0.6);">
                			<img src="//imagess-google.com/system/mobile/lottery/loadingMobile.gif" alt="" class="loadingImg">
            			</div>
            		</div> 
            		<div id="code_cont" class="code_cont" style="">
            			<ul class="plMore" id="id_dlbb_1">
            				<li><em>¥0.00</em><span>投注金额</span></li> 
            				<li><em>¥0.00</em><span>中奖金额</span></li> 
            				<li><em>¥0.00</em><span>活动礼金</span></li> 
            				<li><em>¥0.00</em><span>团队返点</span></li> 
            				<li><em>¥0.00</em><span>团队盈利</span></li>
            			</ul> 
            			<ul class="plMore" id="id_dlbb_2">
            				<li><em>0人</em><span>投注人数</span></li> 
            				<li><em>0人</em><span>首充人数</span></li> 
            				<li><em>0人</em><span>注册人数</span></li> 
            				<li><em>1人</em><span>下级人数</span></li> 
            				<li><em>¥45.50</em><span>团队余额</span></li>
            			</ul> 
            			<ul class="plMore" id="id_dlbb_3">
            				<li><em>¥0.00</em><span>充值金额</span></li> 
            				<li><em>¥0.00</em><span>提现金额</span></li> 
            				<li><em>¥0.00</em><span>代理返点</span></li> 
            				<li></li>
            				<li></li>
            			</ul> 
            			<div class="userTip">
            				<p><i></i>温馨提示：代理报表最多只保存7天。</p>
            			</div>
            		</div>
            	</div>
            </div>
        </div>
	</div>
	<script src="/static/js/member/member_common_func.js"></script>
	<script>
		var resData   = '';
		var param     = {'operation':'getAgentReport', 'timeLine':0, 'forUser':$('#id_for_user').val()};
		getData("{U('json/func_member')}", param);
		$('#timeType a').on('click', '', function (){
			$('#timeType a').removeClass('curr');
			$(this).addClass('curr');
			param.timeLine = $(this).index();
			param.forUser  = $('#id_for_user').val();
			getData("{U('json/func_member')}", param);
			fillData();
		})
		$('#id_search').on('click', '', function (){
			param.timeLine = $(this).index();
			param.forUser  = $('#id_for_user').val();
			getData("{U('json/func_member')}", param);
			fillData();
		})
		
		fillData();
		function fillData(){
			$('#id_dlbb_1 em:eq(0)').html('¥' + resData.betAmount);
			$('#id_dlbb_1 em:eq(1)').html('¥' + resData.prizeAmount);
			$('#id_dlbb_1 em:eq(2)').html('¥0.00');
			$('#id_dlbb_1 em:eq(3)').html('¥0.00');
			$('#id_dlbb_1 em:eq(4)').html('¥0.00');

			$('#id_dlbb_2 em:eq(0)').html(resData.betUserNums + '人');
// 			$('#id_dlbb_2 em:eq(1)').html('0人');
			$('#id_dlbb_2 em:eq(2)').html(resData.regUserNums + '人');
			$('#id_dlbb_2 em:eq(3)').html(resData.lower_nums + '人');
			$('#id_dlbb_2 em:eq(4)').html('¥' + resData.userMoneyAmount);

			$('#id_dlbb_3 em:eq(0)').html('¥' + resData.rechargeAmount);
			$('#id_dlbb_3 em:eq(1)').html('¥' + resData.cashAmount);
			$('#id_dlbb_3 em:eq(2)').html('¥' + resData.repointAmount);
		}
	</script>
{template index/footer}